import type { RouteRecordRaw } from 'vue-router';

const routes: RouteRecordRaw[] = [
    {
        path: '/',
        name: 'index',
        redirect: '/layout',
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/Login.vue'),
    },
    {
        path: '/unauthorized',
        name: 'unauthorized',
        component: () => import('@/views/Unauthorized.vue'),
    },
    {
        path: '/layout',
        name: 'layout',
        component: () => import('@/views/HomeView.vue'),
        redirect: { name: 'user' },
        children: [
            {
                path: '/user',
                name: 'user',
                component: () => import('@/views/testPage/userPage.vue'),
            },
            {
                path: '/depart',
                name: 'depart',
                component: () => import('@/views/testPage/departPage.vue'),
            },
        ],
    },
];

export default routes;
